package gmusic.command;

import gmusic.ma.bo.DemandeChargement;
import gmusic.ma.services.impl.MetalArchivesServicesImpl;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

public class AfficherDemandesChargement implements Command {

	// private final static Logger log =
	// Logger.getLogger(AfficherDemandesChargement.class);

	public String execute(HttpServletRequest req) throws Exception {

		HttpSession session = req.getSession();

		List<DemandeChargement> demToLoad = MetalArchivesServicesImpl
				.getInstance().getDemandesChargementToLoad();
		List<DemandeChargement> demLoading = MetalArchivesServicesImpl
				.getInstance().getDemandesChargementLoading();
		List<DemandeChargement> demLoaded = MetalArchivesServicesImpl
				.getInstance().getDemandesChargementLoaded();

		session.setAttribute("demToLoad", demToLoad);
		session.setAttribute("demLoading", demLoading);
		session.setAttribute("demLoaded", demLoaded);

		return "/afficherDemandesChargement.jsp";
	}
}